package coroutines.exception

import kotlinx.coroutines.*
import java.lang.Exception

class CoroutineExceptionTest5 {
}

fun main() {
    runBlocking {
        val scope = CoroutineScope(CoroutineExceptionHandler{_,_->} + Job())

        scope.launch {
            val asyncA = async {
                println("协程A抛出异常")
                throw Exception("asyncA 抛出的异常")
            }

            asyncA.await()

            delay(100)

            println("父协程执行完毕")
        }

        delay(1000)
    }
}